function addBrand(){
    var authenticity_token = $('#new_product input').val();
    var create_url = "/brands/create?authenticity_token=" + authenticity_token;
    var brand_name = $('#brand_name').val();

    $.post(create_url,{
        "brand[name]":brand_name
    },function(data){
        $("#product_brand_id").addOption(data,brand_name); // add single value (will be selected)
    })
}

function changeCategory(){
    var category_id = $('#product_category_id').val();
    alert(category_id);
}

